/*
 * matrixManipulation.h : header file for matrix manipulation fuctions
 *  - matrix multiplication
 *    1. R = A * B
 *    2. R = A * B * A'
 *    3. R = A'* B * A
 *    4. R = A'* B * C

 *  - matrix inversion
 *  - minor calculation
 *  - determinant calculation
 */
double **matrixAdd(double **A, double **B, int l, int m);
void matrixAddToSelf(double **A, double **B, int l, int m);
double **matrixSubtract(double **A, double **B, int l, int m);
void matrixSubtractFromSelf(double **A, double **B, int l, int m);
double **matrixMultiplyAB(double **A, double **B, int l, int m, int n);
double **matrixMultiplyAtB(double **A, double **B, int l, int m, int n);
double **matrixMultiplyABt(double **A, double **B, int l, int m, int n);
double **matrixMultiplyAtBA(double **A, double **B, int l, int m);
double **matrixMultiplyABAt(double **A, double **B, int l, int m);
double **matrixMultiplyABC(double **A, double **B, double **C,
							int l, int m, int n, int p);
double **matrixMultiplyAtBC(double **A, double **B, double **C,
							int l, int m, int n, int p);
double **matrixInverseByLu(double **A, int n);
double **matrixInverseByDeterminant(double **A, int order);
int matrixGetMinor(double **src, double **dest, int row, int col, int order);
double matrixGetDeterminant( double **mat, int order);
void matrixSetZero(double **A,int l,int m);
void matrixPrint(char *title, double **A,int l,int m);